home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-Sensation: Golden Games
/
Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso
/
Brain Activity
/
Rubik
/
source
/
sequences.c
< prev
next >
Wrap
Text File
|
1990-08-11
|
3KB
|
183 lines
/* move sequences for solving the cube (inefficiently) */
unsigned char corner1 [23][3] =
{
{2,14,1},
{2,7,2},
{1,2,0},
{1,8,0},
{2,17,3},
{1,1,0},
{2,10,3},
{1,13,0},
{1,3,0},
{2,16,2},
{2,11,1},
{2,15,1},
{1,7,0},
{1,14,0},
{1,9,0},
{2,17,2},
{2,8,2},
{1,15,0},
{2,13,1},
{2,10,1},
{2,12,1},
{2,11,3},
{2,16,3}
};
unsigned char corner2 [20][4] =
{
{3,17,10,18},
{3,16,4,18},
{2,12,18,0},
{3,11,5,18},
{2,10,16,0},
{3,12,5,18},
{1,16,0,0},
{2,10,18,0},
{2,6,18,0},
{2,4,17,0},
{3,5,11,18},
{2,4,18,0},
{1,17,0,0},
{3,4,11,16},
{2,5,18,0},
{2,6,17,0},
{2,11,18,0},
{1,18,0,0},
{2,5,17,0},
{2,11,16,0}
};
unsigned char corner3 [17][5] =
{
{3,11,5,12,0},
{3,12,4,10,0},
{3,12,5,12,0},
{3,10,4,10,0},
{1,11,0,0,0},
{2,6,12,0,0},
{4,5,11,4,10},
{2,5,10,0,0},
{2,4,12,0,0},
{4,4,10,5,12},
{2,6,10,0,0},
{2,5,12,0,0},
{3,11,4,10,0},
{1,10,0,0,0},
{1,12,0,0,0},
{4,4,11,4,10},
{2,4,10,0,0}
};
unsigned char corner4 [14][8] =
{
{6,10,6,11,17,6,16,0},
{6,17,6,16,10,6,11,0},
{7,6,17,5,16,10,6,11},
{3,10,6,11,0,0,0,0},
{3,17,6,16,0,0,0,0},
{7,4,17,5,16,10,6,11},
{3,10,4,11,0,0,0,0},
{4,5,17,6,16,0,0,0},
{7,5,17,5,16,10,6,11},
{4,4,17,6,16,0,0,0},
{3,17,5,16,0,0,0,0},
{6,17,5,16,10,6,11,0},
{3,13,11,14,0,0,0,0},
{3,8,16,7,0,0,0,0}
};
unsigned char corner5 [6] [6] =
{
{14,2,13,7,2,8},
{7,1,8,14,1,13},
{8,2,7,17,2,16},
{17,1,16,8,1,7},
{10,2,11,13,2,14},
{13,1,14,10,1,11}
};
unsigned char edge1 [23] [10] =
{
{9,1,8,11,15,9,12,16,8,11},
{6,7,10,17,8,11,1,0,0,0},
{8,9,12,5,7,10,13,7,10,0},
{6,8,11,14,7,10,2,0,0,0},
{8,9,12,4,8,11,16,8,11,0},
{7,1,7,10,18,8,11,1,0,0},
{6,1,8,11,13,7,10,0,0,0},
{8,1,5,9,12,4,9,12,4,0},
{8,1,4,7,10,17,8,11,5,0},
{6,1,9,12,4,9,12,0,0,0},
{6,2,8,11,14,7,10,0,0,0},
{6,2,9,12,5,9,12,0,0,0},
{6,1,7,10,17,8,11,0,0,0},
{8,1,4,9,12,4,9,12,5,0},
{8,1,5,7,10,17,8,11,4,0},
{8,13,1,9,12,4,9,12,14,0},
{8,13,2,8,11,14,7,10,14,0},
{8,16,2,9,12,5,9,12,17,0},
{8,16,1,7,10,17,8,11,17,0},
{8,14,1,9,12,4,9,12,13,0},
{8,14,2,8,11,14,7,10,13,0},
{8,17,2,9,12,5,9,12,16,0},
{8,17,1,7,10,17,8,11,16,0}
};
unsigned char edge2 [22] [14] =
{
{6,7,10,17,8,11,1,0,0,0,0,0,0,0},
{8,9,12,5,7,10,13,7,10,0,0,0,0,0},
{6,8,11,14,7,10,2,0,0,0,0,0,0,0},
{8,9,12,4,8,11,16,8,11,0,0,0,0,0},
{13,1,7,10,18,7,10,5,8,11,17,8,11,1},
{12,1,7,10,18,7,10,6,7,10,13,7,10,0},
{3,5,19,4,0,0,0,0,0,0,0,0,0,0},
{3,5,20,4,0,0,0,0,0,0,0,0,0,0},
{1,19,0,0,0,0,0,0,0,0,0,0,0,0},
{1,20,0,0,0,0,0,0,0,0,0,0,0,0},
{1,21,0,0,0,0,0,0,0,0,0,0,0,0},
{1,22,0,0,0,0,0,0,0,0,0,0,0,0},
{3,5,21,4,0,0,0,0,0,0,0,0,0,0},
{3,5,22,4,0,0,0,0,0,0,0,0,0,0},
{3,13,19,14,0,0,0,0,0,0,0,0,0,0},
{3,13,20,14,0,0,0,0,0,0,0,0,0,0},
{3,16,21,17,0,0,0,0,0,0,0,0,0,0},
{3,16,22,17,0,0,0,0,0,0,0,0,0,0},
{3,14,19,13,0,0,0,0,0,0,0,0,0,0},
{3,14,20,13,0,0,0,0,0,0,0,0,0,0},
{3,17,21,16,0,0,0,0,0,0,0,0,0,0},
{3,17,22,16,0,0,0,0,0,0,0,0,0,0}
};
unsigned char edge3 [4] [9] =
{
{8,7,10,16,7,10,4,9,12},
{6,2,8,11,14,7,10},
{8,8,11,13,8,11,5,9,12},
{6,1,7,10,17,8,11}
};
unsigned char edge4 [5] [6] =
{
{3,7,10,18,8,11},
{15,8,11,6,7,10},
{18,8,11,3,7,10},
{6,8,11,18,7,10},
{18,7,10,6,8,11}
};
unsigned char edge5 [6] [5] =
{
{13,1,7,14,2},
{2,16,7,1,17},
{4,14,7,5,13},
{16,2,8,17,1},
{14,4,8,13,5},
{5,17,8,4,16}
};